#type
Description: Get the type.
def type(obj):
'''
Get the type
:param obj: a variable
:return: the type of obj
'''
def type(name, bases, dict, **kwds):
'''
Create a type
:param name: type name
:param bases: base classes
:param dict: attribute dictionary
:param kwds: additional attributes
:return: the new type
'''
Example:
print(type(233))
print(type(3.14))
print(type('hello world'))
print(type([1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6]))
obj = type('MyClass', (), {'name':'Alice', 'age':18})
print(obj, obj.name, obj.age)